package com.xingkeduo.pojo.enums;

/**
 * 文件概述
 *
 * @author wangxilong <wangxilong@xingkeduo.com>
 * @version id:v0.1 19-1-7 下午3:24
 * @package BeautyOS
 * @copyright Copyright (c) XKD 2019
 */
public enum ShopsStatus {
    INIT(0, "已创建","0","未开业“装修中”"),
    HOT(1, "预热中","3","试运营"),
    OPEN(2, "开业中","1","营业中"),
    TEMPCLS(3, "临时闭店","2","暂停营业"),
    CLOSED(4,"已撤店","5","闭店歇业");


    private Integer value;
    private String desc;
    private String oldValue;
    private String oldDesc;

    ShopsStatus(Integer value, String desc, String oldValue, String oldDesc) {
        this.value = value;
        this.desc = desc;
        this.oldValue = oldValue;
        this.oldDesc = oldDesc;
    }
    public String getOldValue() {
		return oldValue;
	}


	public void setOldValue(String oldValue) {
		this.oldValue = oldValue;
	}


	public String getOldDesc() {
		return oldDesc;
	}


	public void setOldDesc(String oldDesc) {
		this.oldDesc = oldDesc;
	}


	public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    //获取枚举对象
    public static ShopsStatus get(Integer value){
        for(ShopsStatus useStatus: ShopsStatus.values())
            if (useStatus.getValue().equals(value)) {
                return useStatus;
            }
        return null;
    }

}
